<template>
  <span v-if="value&&value.length>1" class="erererrr">
    <template v-for="(item, index) in valueArr">
      &nbsp;<LamStatus :key="index" :value="item" :text="textArr[index]" :styleMap="statusStyle" :useTag="useTag"/>
    </template>
  </span>
  <LamStatus v-else :value="value" :text="text" :styleMap="statusStyle" :useTag="useTag"/>
</template>

<script>
  export default{
    name:'JobScheduleStatus',
    props:{
      useTag:{
        type:Boolean,
        default: true
      },
      value:{
        type:String|Number,
        require: true
      },
      text:{
        type: String,
        require: true
      }
    },
    data(){
      return{
        /**  定时任务状态 */
        statusStyle:{
          'NORMAL':'#54A0FF',
          'WAITING':'#54A0FF',
          'ACQUIRED': '#589baf',
          'EXECUTING':'green',
          'RUNNING':'green',
          'PAUSED':'gray',
          'PAUSED_BLOCKED':'#ffba00',
          'COMPLETE':'#00aa00',
          'BLOCKED':'#da5d5d',
          'ERROR':'red',
          'DELETED':'gray',
        },
      }
    },
    computed:{
      valueArr(){
        return this.value&&this.value.length>1?this.value.split(','):[this.value]
      },
      textArr(){
        return this.text&&this.text.length>1?this.text.split(','):[this.text]
      },
    },
    created(){
    },

  }

</script>

<style scoped>

</style>
